<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>.: cPanel - Categories :.</title>
	<?php $this->import()?>
	<script type="text/javascript">
		function confirmDelete(name) {
			return confirm("Are you sure you want to delete Category [" + name + "]?");
		}
	</script>
</head>
<body>
	<?php $this->header()?><br/>
		<table width="100%"><tr>
			<td align="left" width="50%"><a href="?c=cpanel&a=cats">Categories</a> ></td>
			<td align="right" width="50%"><a href="?c=cpanel&a=catnew">Create new Category</a></td>
		</tr></table>
		<hr/>
		<center>
			<table class="grid" cellspacing="1" cellpadding="5">
				<tr>
					<th align="center">Order</th>
					<th align="center" width="520">Category</th>
					<th align="center">Edit</th>
					<th align="center">Delete</th>
					<th align="center">Test</th>
				</tr>
				<?php $i = 1; foreach ($cats as $cat) {?>
					<tr>
						<td align="center"><?php echo $i;?></td>
						<td align="left"><a href="?c=cpanel&a=secs&cid=<?php echo $cat->id;?>"><?php echo $cat->name;?></a></td>
						<td align="center"><a href="?c=cpanel&a=catedit&id=<?php echo $cat->id;?>">Edit</a></td>
						<td align="center"><a href="?c=cpanel&a=catdel&id=<?php echo $cat->id;?>" onclick="return confirmDelete('<?php echo $cat->name;?>')">Delete</a></td>
						<td align="center"><a href="?c=exam&a=exam&id=<?php echo $cat->id;?>">Test</a></td>
					</tr>
				<?php $i++; } ?>
			</table>
		</center>
		<br/>
	<?php $this->footer()?>
</body>
</html>